<div class="file-all">
  <div class="head">
    <button nz-button nzType="primary"
            nzSize="small" [nzGhost]="true"
            nzShape="round" [disabled]="isChecked"
            (click)="delete(checkedModel,false)">
      <i nz-icon nzType="delete" nzTheme="outline"></i>
      <span>取消共享</span>
    </button>
  </div>
  <div class="content">
    <nz-table #dataTable
              [nzPageSize]="100000000"
              [nzData]="tableModel"
              [nzShowPagination]="false"
              nzSize="small">
      <thead (nzSortChange)="sort($event,name,size,createTime,downloadNum,browseNum,preserveNum)" nzSingleSort>
      <tr class="thead-tr">
        <th nzShowCheckbox
            [(nzChecked)]="isAllChecked"
            (nzCheckedChange)="checkAll()"
            class="th-td-1">
        </th>
        <th nzShowSort nzSortKey="name" class="th-td-5" #name>名称</th>
        <th nzShowSort nzSortKey="size" class="th-td-3" #size>失效时间</th>
        <th nzShowSort nzSortKey="createTime" class="th-td-4 th-td-hidden" #createTime>分享时间</th>
        <th nzShowSort nzSortKey="downloadNum" class="th-td-4 th-td-hidden" #downloadNum>下载次数</th>
        <th nzShowSort nzSortKey="browseNum" class="th-td-4 th-td-hidden" #browseNum>浏览次数</th>
        <th nzShowSort nzSortKey="preserveNum" class="th-td-4 th-td-hidden" #preserveNum>保存次数</th>
        <th class="th-td-2">操作</th>
      </tr>
      </thead>
      <tbody>
      <tr *ngFor="let data of dataTable.data">
        <td nzShowCheckbox
            [(nzChecked)]="checkedModel[data.id]"
            (nzCheckedChange)="checkboxChoice(data)"
            class="th-td-1">
          <i nz-icon nzType="share-alt" nzTheme="outline"></i>
        </td>
        <td class="th-td-5" title="{{data.name}}">{{ data.name }}</td>
        <td class="th-td-3">{{data['validTime']}}</td>
        <td class="th-td-4 th-td-hidden">{{data['createTime']}}</td>
        <td class="th-td-4 th-td-hidden">{{ data['downloadNum'] }}</td>
        <td class="th-td-4 th-td-hidden">{{ data['browseNum'] }}</td>
        <td class="th-td-4 th-td-hidden">{{ data['preserveNum'] }}</td>
        <td class="th-td-2">
          <a style="margin-left: 5px;display: inline-block" (click)="delete(data['id'],true)">取消</a>
          <a style="margin-left: 5px;display: inline-block" (click)="lookOver(data)">查看</a>
        </td>
      </tr>
      </tbody>
    </nz-table>
  </div>
  <!--  url地址-->
  <nz-modal [(nzVisible)]="isUrlVisible"
            nzTitle="下载地址"
            (nzOnCancel)="isUrlVisible = false"
            nzOkText="复制"
            (nzOnOk)="isUrlVisible = false;copy('地址:'+currentObj.shareUrl+(currentObj.drawCode?'提取码:'+currentObj.drawCode:''))">
    <span>地址：</span><a>{{currentObj.shareUrl}}</a>
    <br/>
    <ng-container *ngIf="currentObj.drawCode">
      <span>提取码：</span><a>{{currentObj.drawCode}}</a>
    </ng-container>
  </nz-modal>
</div>

